RULES = {}
RULES.types = {};
RULES.registerType = function(typeId, func) {
	this.types[typeId] = func;
}
RULES.newType = function(typeId) {
	var func = this.types[typeId];
	return new func();
}

GENERATORS = {}
GENERATORS.types = {};
GENERATORS.registerType = function(typeId, func) {
	this.types[typeId] = func;
}
GENERATORS.newType = function(typeId) {
	var func = this.types[typeId];
	return new func();
}

DIALOGS = {}
DIALOGS.types = {};
DIALOGS.registerType = function(typeId, func) {
	this.types[typeId] = func;
}
DIALOGS.newType = function(typeId) {
	var func = this.types[typeId];
	return new func();
}

MEYOUSTACK = []; 

ME = {};
ME.run = function(inp) {
    
	  var async = {};
	  async.getInput = function() { return inp; };
	  async.onComplete = function(out) { return out; };
	  
	  MEYOUSTACK.push(async);
	  
	  return async;
}
		

